package xyz.poke.business.tool.utils;

import java.util.Objects;

/**
 * @author 迫壳
 * @date 2024/3/6 22:52
 */
public class MySecretUtils {

    public static String decode(String password) {
        if (Objects.isNull(password)) {
            return null;
        }
        char[] passwordChars = password.toCharArray();
        StringBuilder sb = new StringBuilder();
        // 最后一个字符丢弃
        char temp;
        for (int i = 0; i < passwordChars.length -1; i++) {
            temp = (char) (passwordChars[i] + 4);
            sb.append(temp);
        }
        return sb.toString();
    }
}
